home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / thrmde / therm.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-01-02  |  3.6 KB  |  97 lines

  1. VERSION 2.00
  2. Begin Form Thermometer 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Progress Meter"
  6.    ClientHeight    =   3330
  7.    ClientLeft      =   2025
  8.    ClientTop       =   1365
  9.    ClientWidth     =   6465
  10.    ControlBox      =   0   'False
  11.    Height          =   3735
  12.    Left            =   1965
  13.    LinkTopic       =   "Thermometer"
  14.    MaxButton       =   0   'False
  15.    MinButton       =   0   'False
  16.    MousePointer    =   11  'Hourglass
  17.    ScaleHeight     =   3330
  18.    ScaleWidth      =   6465
  19.    Top             =   1020
  20.    Width           =   6585
  21.    Begin SSPanel Gauge 
  22.       FloodType       =   1  'Left To Right
  23.       FontBold        =   -1  'True
  24.       FontItalic      =   0   'False
  25.       FontName        =   "MS Sans Serif"
  26.       FontSize        =   9.75
  27.       FontStrikethru  =   0   'False
  28.       FontUnderline   =   0   'False
  29.       Height          =   510
  30.       Left            =   705
  31.       TabIndex        =   0
  32.       Top             =   1755
  33.       Width           =   5100
  34.    End
  35.    Begin Label txt_message 
  36.       Alignment       =   2  'Center
  37.       BackStyle       =   0  'Transparent
  38.       Caption         =   "Please Wait..."
  39.       FontBold        =   -1  'True
  40.       FontItalic      =   0   'False
  41.       FontName        =   "MS Sans Serif"
  42.       FontSize        =   9.75
  43.       FontStrikethru  =   0   'False
  44.       FontUnderline   =   0   'False
  45.       Height          =   1095
  46.       Left            =   345
  47.       TabIndex        =   1
  48.       Top             =   225
  49.       Width           =   5775
  50.    End
  51. '*******************************************************
  52. '*                                                     *
  53. '*      File Name: Therm.FRM                           *
  54. '*                                                     *
  55. '*        Created: 12/22/94     By: RDV                *
  56. '*                                                     *
  57. '* Comments: Displays a progress thermometer.          *
  58. '*           See Therm.BAS for interface.              *
  59. '*                                                     *
  60. '*******************************************************
  61. Option Explicit
  62. Const GWL_STYLE = (-16)
  63. Const WS_DISABLED = &H8000000
  64. Const MOUSE_HOURGLASS = 11
  65. Const MOUSE_DEFAULT = 0
  66. Option Base 1
  67. Dim a_disabledForms() As Long
  68. Dim i_disabledCount As Long
  69. Declare Function GetWindowLong Lib "User" (ByVal hWnd As Integer, ByVal nIndex As Integer) As Long
  70. Declare Function SetWindowLong Lib "User" (ByVal hWnd As Integer, ByVal nIndex As Integer, ByVal dwNewLong As Long) As Long
  71. Sub Form_Load ()
  72.     Dim l_winStyle As Long
  73.     Dim i As Integer
  74.     screen.MousePointer = MOUSE_HOURGLASS
  75.     i_disabledCount = 0
  76.     For i = 0 To Forms.Count - 1
  77.         l_winStyle = GetWindowLong(Forms(i).hWnd, GWL_STYLE)
  78.         If l_winStyle And Not WS_DISABLED And Forms(i).hWnd <> Me.hWnd Then
  79.             l_winStyle = SetWindowLong(Forms(i).hWnd, GWL_STYLE, l_winStyle Or WS_DISABLED)
  80.             i_disabledCount = i_disabledCount + 1
  81.             ReDim Preserve a_disabledForms(i_disabledCount) As Long
  82.             a_disabledForms(i_disabledCount) = Forms(i).hWnd
  83.         End If
  84.     Next i
  85. End Sub
  86. Sub Form_Unload (Cancel As Integer)
  87.     Dim l_winStyle As Long
  88.     Dim l_winStyle2 As Long
  89.     Dim i As Integer
  90.     For i = 1 To i_disabledCount
  91.         l_winStyle = GetWindowLong(a_disabledForms(i), GWL_STYLE)
  92.         l_winStyle2 = SetWindowLong(a_disabledForms(i), GWL_STYLE, l_winStyle And Not WS_DISABLED)
  93.         l_winStyle2 = GetWindowLong(a_disabledForms(i), GWL_STYLE)
  94.     Next i
  95.     screen.MousePointer = MOUSE_DEFAULT
  96. End Sub
  97.